package com.itheima.text1;

public class Text6 {
    public static void main(String[] args) {
       goSwimming(new Swimming() {
           @Override
           public void swim() {
               System.out.println("洗浴中心");
           }
       });
    }

    public static void goSwimming(Swimming s) {

        s.swim();
    }
}
interface Swimming {
    void swim();
}